<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- <script src="../js/index-body.js"></script> -->
    <!-- <link rel="stylesheet" href="../css/index-body.css"> -->
    <script>
        window.onload = function(){
            console.log('页面加载。。。。')
            //调用接口，获取商品列表数据，并动态加载到ul中
            // http://localhost:5501/html/ceshi.html
            $.ajax({
                url:"http://localhost:3000/api/jewelry",
                success:function(res){
                    var products = res.data
                    var strHTML = ''
                    for(var i = 0 ; i < products.length ; i++){
                        strHTML += `
                                    <li>
                                        <a href="productDetail.html?title=${products[i]}">${products[i]}</a>
                                    </li>
                        `
                    }
                    $('.plist').html(strHTML)
                }
            })
        }
    </script>
</head>
<body>
    <div class="market-list">
        <div class="l-market">
            <div class="market-card">
                <div class="back1">
                    <div>
                        <p class="text">热门饰品</p>
                        <p></p>
                        <p></p>
                        <p></p>
                        <p></p>
                    </div><br><br>
                    <div class="list-card">
                        <ul class="mybishou">
                        </ul>
                    </div>
                </div>
                <div class="back2">
                    <div>
                        <p class="text">最新上架</p>
                        <p></p>
                        <p></p>
                        <p></p>
                        <p></p>
                    </div><br><br>
                    <div class="list-card">
                        <ul class="mybishou">
                        </ul>
                    </div>    
                </div>
                <div class="back3">
                    <div>
                        <p class="text">最新求购</p>
                        <p></p>
                        <p></p>
                        <p></p>
                        <p></p>
                    </div><br><br>
                    <div class="list-card">
                        <ul class="mybishou">
                        </ul>
                    </div>    
                </div>
            </div>
        </div>
    </div>
</body>
</html>